
#import <Cocoa/Cocoa.h>


@class FolderModel;
@class PhotoBrowser;
@class ThumbData;

typedef enum
{
	OT_COPY,
	OT_MOVE,
	OT_ROTATE,
	OT_GEN_THUMB,
} OperationType;

//------------------------------------------------------------------------------
/*
 * This object is passed from the GUI thread to the operation thread; it defines which
 * files are to be operated on, where the files are going, what the operation is and 
 * whether the selection should be cleared when done (which is passed back to the GUI 
 * thread when the operation ends).
 */
@interface OperationStartData : NSObject
{
@public
	NSString		*destDir;
	SEL				selOp;
	NSMutableArray	*thumbList;
	BOOL			clearSel;
	BOOL			updateThumb;
	OperationType	opType;
};


-(void) set:(NSString*)pDestDir  sel:(SEL)pSelOp
			thumbList:(NSMutableArray*)pThumbList    clearSel:(BOOL)clearSel
			updateThumb:(BOOL)pUpdateThumb   opType:(OperationType)pOpType;

@end


//------------------------------------------------------------------------------
/*
 * This object is passed from the operation thread to the GUI thread when the operation
 * thread is done, even upon failure or forced stop.
 */
@interface OperationCompleteData : NSObject
{
@public
	BOOL			clearSel;
	int				completedCount;
	int				lastRet;
	NSMutableArray	*thumbList;
	NSString		*destDir;
	ThumbData		*tdLast;
	OperationType	opType;
}

- (void) set:(NSString*) pDestDir  thumbList:(NSMutableArray*)pThumbList  
			tdLast:(ThumbData*) ptdLast  opType:(OperationType)pOpType;

@end


//------------------------------------------------------------------------------
@interface FMStartLoad : NSObject
{
	NSString	*path;
	BOOL		showImage;
}

- (id) initFile:(NSString*) apath  showImage:(BOOL)aShowImage;

- (NSString*) path;
- (BOOL) showImage;

@end

//------------------------------------------------------------------------------
@interface FMAvailableData : NSObject
{
	NSString	*firstFile;
	FolderModel	*fm;
	BOOL		showImage;
};

- (id) initFile:(NSString*) aFirstFile  fm:(FolderModel*) aFM  showImage:(BOOL)aShowImage;

- (FolderModel*) folderModel;
- (NSString*) firstFile;
- (BOOL) showImage;

@end
